package Service.Impl;

import Dao.Impl.OrdersDaoImpl;
import Dao.OrdersDao;
import Domain.*;
import Service.OrderService;

import java.util.List;

public class OrderServiceImpl implements OrderService {
    private OrdersDao dao=new OrdersDaoImpl();
    @Override
    public void insertorders(List<Product> p, User u,List<Cart> c, int payid) {
        dao.insertOrder(p,u,c,payid);
    }

    @Override
    public void buyone(Product p, User u, int num, int payid) {
        dao.buyone(p,u,num,payid);
    }

    @Override
    public List<Orders> selectorderbyuserid(int userid) {
        return  dao.selectorderbyuserid(userid);
    }

    @Override
    public List<topr2> getoandpselect() {
        return dao.oandpselect();
    }

    @Override
    public List<Orderselect> getorderselect(int id) {
        return dao.Orderselectbyid(id);
    }


}
